package com.sk.weichat.ui.me.wallet;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.sk.weichat.R;
import com.sk.weichat.ui.base.BaseActivity;

/**
* 身份证件信息
* */
public class IDInformationActivity extends BaseActivity implements View.OnClickListener {
    private ImageView ivBack;
    private TextView tv_title_center;

    private TextView tv_id_type;
    private TextView tv_id_name;
    private TextView tv_id_code;

    private String name;
    private String idCard;
    private String cardType;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_id_information);

        getSupportActionBar().hide();

        name = getIntent().getStringExtra("name");
        idCard = getIntent().getStringExtra("idCard");
        cardType = getIntent().getStringExtra("cardType");
        initView();
    }

    private void initView(){
        ivBack = findViewById(R.id.iv_title_left);
        tv_title_center = findViewById(R.id.tv_title_center);
        tv_title_center.setText(getString(R.string.id_info));
        ivBack.setOnClickListener(this);

        tv_id_type = findViewById(R.id.tv_id_type);
        tv_id_name = findViewById(R.id.tv_id_name);
        tv_id_code = findViewById(R.id.tv_id_code);
        if (cardType.equals("1")){
            tv_id_type.setText(getString(R.string.ID_Card));
        }
        tv_id_name.setText(name);
        tv_id_code.setText(idCard);

    }

    @Override
    public void onClick(View v) {
        if (v==ivBack){
            finish();
        }
    }
}
